import { Http } from 'jz-tool-lib'

export const http = new Http({
  timeout: 60000,
  baseURL: import.meta.env.VITE_API_URL,
  headers: {
    'Content-Type': 'application/json',
  },
  requestInterceptorsSuccess: (config) => {
    return Promise.resolve(config)
  },
  requestInterceptorsCatch: (error) => {
    return Promise.reject(error)
  },
  responseInterceptorsSuccess: (response) => {
    return Promise.resolve(response)
  },
  responseInterceptorsCatch: (error) => {
    return Promise.reject(error)
  },
})
